package com.ahdms.es.bean.enums;

import com.ahdms.es.bean.IAlertAble;

/**
 * @author qinxiang
 * @date 2021-04-23 14:30
 */
public enum ApiCode implements IAlertAble {

    Config_Not_Init(1001,"配置文件未初始化"),


    SESIGN_FORMART_FAIL(2001,"电子签章数据格式错误"),
    SESIGN_VERSION_FAIL(2002,"未知的数据结构，无法匹配任何已知版本电子签章数据。"),
    SESIGN_VERIFY_SIGN_FAIL(2003,"电子签章签名值验签失败!"),
    SESIGN_SIGN_Algorithm_FAIL(2004,"电子签章签名算法不支持!"),
    SESIGN_VERIFY_DATAHASH_FAIL(2005,"原文杂凑验证失败，文件被篡改！"),
    SESIGN_VERIFY_DATE_FAIL(2006,"证书在签章之前已被吊销，签章无效"),
    SESIGN_VERIFY_SignDate_CertDate_Fail(2006,"签章时间不在签章人数字证书有效期内，签章无效"),
    SESIGN_VERIFY_SignCert_Fail(2007,"签章人数字证书无效!"),
    SESIGN_VERIFY_Seal_Fail(2008,"电子印章验证失败"),

    SEAL_FORMART_FAIL(3001,"电子印章数据格式错误"),
    SEAL_VERSION_FAIL(3002,"未知的数据结构，无法匹配任何已知版本电子印章。"),
    SEAL_VERIFY_SIGN_FAIL(3003,"电子印章签名值验签失败!"),
    SEAL_SIGN_Algorithm_FAIL(3004,"电子印章签名算法不支持!"),
    SEAL_DATE_Invalid(3005,"电子印章未生效"),
    SEAL_DATE_Expired(3006,"电子印章已过期"),
    SEAL_CERT_Invalid(3007,"制章人证书验证失败"),


//    CERT_FORMART_FAIL(4001,""),
//    CERT_Algorithm_Invalid(4002,"不支持的公钥参数"),
//    CERT_FORMART_FAIL(4001,""),

    ;

    ApiCode(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    private Integer code;

    private String msg;

    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return msg;
    }

}
